ngcap: ngcap.o packethandler.o rawsocket.o frame.o filter.o trace.o packet.o
	g++ -o ngcap ngcap.o packethandler.o rawsocket.o frame.o filter.o trace.o packet.o -lpthread

ngcap.o: ngcap.cpp ngcap.hpp packet.hpp trace.hpp packethandler.hpp packet_header.hpp frame.hpp frame.cpp
	g++ -Wall -Wextra -Werror -ansi -pedantic -o ngcap.o -c ngcap.cpp 

packethandler.o: packethandler.cpp packethandler.hpp packet.hpp rawsocket.hpp trace.hpp filter.hpp packet_header.hpp frame.hpp frame.cpp
	g++ -Wall -Wextra -Werror -ansi -pedantic -o packethandler.o -c packethandler.cpp

rawsocket.o: rawsocket.cpp rawsocket.hpp
	g++ -Wall -Wextra -Werror -ansi -pedantic -o rawsocket.o -c rawsocket.cpp

frame.o: frame.cpp frame.hpp packet_header.hpp trace.hpp filter.hpp filter.cpp
	g++ -Wall -Wextra -Werror -ansi -pedantic -o frame.o -c frame.cpp

filter.o: filter.cpp filter.hpp
	g++ -Wall -Wextra -Werror -ansi -pedantic -o filter.o -c filter.cpp

exception.o: exception.cpp exception.hpp
	g++ -Wall -Wextra -Werror -ansi -pedantic -o exception.o -c exception.cpp

trace.o: trace.cpp trace.hpp
	g++ -Wall -Wextra -Werror -ansi -pedantic -o trace.o -c trace.cpp

packet.o: packet.cpp packet.hpp filter.hpp filter.cpp packet_header.hpp 
	g++ -Wall -Wextra -Werror -ansi -pedantic -o packet.o -c packet.cpp
	

clean:
	rm -fr *.o ngcap
